<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_主轴对齐方式</title>
    <style>
        .item{
            background-color: lightgreen;
            border:3px solid green;
            width: 100px;
            height: 100px;
        }
        .box{
            background-color: yellow;
            display: flex;//弹性布局
            /* 03-主轴对齐方式*/
            justify-content: flex-start;/* 主轴起点对齐 */
            justify-content: flex-end;/* 主轴终点对齐 */
            justify-content: center;/* 主轴居中对齐 */
            justify-content: space-between;/* 主轴两端对齐 */
            justify-content: space-around;/* 主轴环绕对齐 */
            justify-content: space-evenly;/* 主轴公平对齐 */

            /* 04-交叉轴对齐方式 交叉轴：与主轴永远垂直的轴 */
            height: 350px;
            align-items: flex-start;
            align-items: flex-end;
            align-items: center;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
    </div>
    <div class="box2">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
    </div>
</body>
</html>